import request from '@/utils/request'

// 查询设备命令值列表
export function listCommandAttr(query) {
  return request({
    url: '/device/commandAttr/list',
    method: 'get',
    params: query
  })
}

// 查询设备命令值详细
export function getCommandAttr(id) {
  return request({
    url: '/device/commandAttr/' + id,
    method: 'get'
  })
}

// 新增设备命令值
export function addCommandAttr(data) {
  return request({
    url: '/device/commandAttr',
    method: 'post',
    data: data
  })
}

// 修改设备命令值
export function updateCommandAttr(data) {
  return request({
    url: '/device/commandAttr',
    method: 'put',
    data: data
  })
}

// 删除设备命令值
export function delCommandAttr(id) {
  return request({
    url: '/device/commandAttr/' + id,
    method: 'delete'
  })
}
